package com.resign.carl.singleton;

import com.resign.carl.singleton.impl.EagerSingleton;
import com.resign.carl.singleton.impl.LazySingleton;
import com.resign.carl.singleton.impl.Singleton;

/**
 * 单例模式
 * 整个系统只有一个实例
 * Created by carl.zhao on 2016/6/14.
 */
public class Client {
    public static void main(String[] args) {
        System.out.println(EagerSingleton.getInstance() == EagerSingleton.getInstance());
        System.out.println(LazySingleton.getInstance() == LazySingleton.getInstance());
        System.out.println(Singleton.getInstance() == Singleton.getInstance());
    }
}
